package cn.le.service;

import cn.le.bean.dto.ImUserDTO;
import cn.le.bean.po.ImUserPO;
import cn.le.dao.ImUserDAO;
import cn.le.netty.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ImUserService {

    @Autowired
    private ImUserDAO imUserDAO;

    public void login(ImUserDTO dto){
        ImUserPO po = imUserDAO.login(dto.getName(),dto.getName());
        //记录用户登录信息
        RedisUtils.ImUserUtils.login(String.valueOf(po.getId()),po.getName());
    }
}
